package com.shujia.dim

import com.shujia.util.FlinkTool

object DimKafkaMysqlUserInfo extends FlinkTool{
  /**
    * 需要在子类实现抽象方法
    *
    */
  override def run(args: Array[String]): Unit = {
    table.executeSql(
      """
        |insert into gma_dim.dim_kafka_mysql_user_info
        |select
        |id,
        |UPPER(MD5(login_name)) as login_name,
        |UPPER(MD5(nick_name)) as nick_name,
        |UPPER(MD5(passwd)) as passwd,
        |UPPER(MD5(name)) as name,
        |UPPER(MD5(phone_num)) as phone_num,
        |UPPER(MD5(email)) as email,
        |head_img,
        |user_level,
        |birthday,
        |gender,
        |create_time
        |from gma_ods.ods_mysql_kafka_user_info
        |/*+ OPTIONS('scan.startup.mode'='earliest-offset','canal-json.ignore-parse-errors'='true') */
        |
        |
        |
      """.stripMargin)
  }
}
